home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
TEMP
/
GNU
/
bison
/
Declaratio
< prev
next >
Wrap
Text File
|
1995-06-28
|
1KB
|
31 lines
Declarations
Previous: <Semantics=>Semantics> * Next: <Multiple Parsers=>MultiplePa> * Up: <Grammar File=>GrammarFil>
#Wrap on
{fH3}Bison Declarations{f}
The {fUnderline}Bison declarations{f} section of a Bison grammar defines the symbols
used in formulating the grammar and the data types of semantic values.
\*Note <Symbols=>Symbols>.
All token type names (but not single-character literal tokens such as
{fCode}'+'{f} and {fCode}'\*'{f}) must be declared. Nonterminal symbols must be
declared if you need to specify which data type to use for the semantic
value (\*Note <Multiple Types=>MultipleTy>: More Than One Value Type).
The first rule in the file also specifies the start symbol, by default.
If you want some other symbol to be the start symbol, you must declare
it explicitly (\*Note <Language and Grammar=>Languagean>: Languages and Context-Free Grammars).
#Wrap off
<Token Decl=>TokenDecl>: Declaring terminal symbols.
<Precedence Decl=>Precedence>: Declaring terminals with precedence and associativity.
<Union Decl=>UnionDecl>: Declaring the set of all semantic value types.
<Type Decl=>TypeDecl>: Declaring the choice of type for a nonterminal symbol.
<Expect Decl=>ExpectDecl>: Suppressing warnings about shift\/reduce conflicts.
<Start Decl=>StartDecl>: Specifying the start symbol.
<Pure Decl=>PureDecl>: Requesting a reentrant parser.
<Decl Summary=>DeclSummar>: Table of all Bison declarations.
#Wrap on